<?php
class Omc extends AppModel
{
    /**
     * associations
     */
    var $hasMany = array(
        'OmcUser' => array(
            'className' => 'OmcUser',
            'foreignKey' => 'omc_id',
            'dependent' => false,
            'conditions' => '',
            'fields' => '',
            'order' => '',
            'limit' => '',
            'offset' => '',
            'exclusive' => '',
            'finderQuery' => '',
            'counterQuery' => ''
        ),
        
        'BdcDistribution' => array(
            'className' => 'BdcDistribution',
            'foreignKey' => 'omc_id',
            'dependent' => false,
            'conditions' => '',
            'fields' => '',
            'order' => '',
            'limit' => '',
            'offset' => '',
            'exclusive' => '',
            'finderQuery' => '',
            'counterQuery' => ''
        )
    );

    var $belongsTo = array(
        'Bdc' => array(
            'className' => 'Bdc',
            'foreignKey' => 'bdc_id',
            'conditions' => '',
            'order' => '',
            'limit' => '',
            'dependent' => false
        ),
        'District' => array(
            'className' => 'District',
            'foreignKey' => 'district_id',
            'conditions' => '',
            'order' => '',
            'limit' => '',
            'dependent' => false
        ),
        'Omclist' => array(
            'className' => 'Omclist',
            'foreignKey' => 'omclist_id',
            'conditions' => '',
            'order' => '',
            'limit' => '',
            'dependent' => false
        )
    );


    function getOmcById($id=null){
        return $this->find('first',array('conditions'=>array('id'=>$id),'recursive'=>-1));
    }

}
